import axios from 'axios';

// const back_prefix='http://10.172.0.134:10420/api';
const back_prefix='http://127.0.0.1:10420/api';

const instance=axios.create({
  
})

const fetchData = async (apiUrl:string) => {
    try {
        const fullUrl=back_prefix+apiUrl
      const response = await axios.get(fullUrl);
      console.log('resp:',response)
      return response.data; 
    } catch (error) {
      console.error("Error fetching data: ", error);
    }
  };


  export {fetchData}